<script src="./js/glDatePicker.min.js"></script>

    <script type="text/javascript">
        $(window).load(function()
        {
            $('#mydate').glDatePicker({});
            
        });
    </script>
    
    <div id="content">
    <?php
    include("./PDO/PdoAdmin.php"); //On inclut les fonctions PDO (create / update etc...)
    include("./class/Admin.php"); //On inclut les fonctions PDO (create / update etc...)

    $admin = new PdoAdmin();
    $admin = $admin->readAll();
    ?>
    <form id="validate_form" action="index.php?route=news&action=traitement_ajout" method="post">
        <label>Titre</label>
        <input type="text" name="TITRENEWS" id="TITRENEWS" class="validate[required]"/><span id="mess_exist"></span>
        <label>Date</label>
        <input type="text" name="DATENEWS" id="mydate" class="validate[required]"/>
        <label>Type</label>
        <input type="text" name="TYPENEWS" id="TYPENEWS"/>
        <label>Auteur</label>
        <select name="IDADMIN" size="1">
            <?php
            foreach ($admin as $unadmin) {
                echo '<option value="' . $unadmin["IDADMIN"] . '">' . $unadmin["PSEUDOADMIN"] . '</option>';
            }
            ?>
        </select>
        <label>Contenu</label>
        <textarea name="CONTENUNEWS" id="CONTENUNEWS" class="validate[required]"></textarea>
         <br/>
        <input type="submit" id="valider" />
    </form>
</div>
